
cmake_minimum_required(VERSION 3.18.1)
include_directories("inc")
project("ndkapplication")

#批量导入所有cpp文件
file(GLOB allCPP *.cpp *.c *.h)
add_library( # Sets the name of the library.
             ndkapplication

             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
            # native-lib.cpp//批量导入所有文件就不需要挨个导入了
        ${allCPP}
        )
#导入库文件
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/../jniLibs/${CMAKE_ANDROID_ARCH_ABI}")
#find_library( # Sets the name of the path variable.
#              log-lib
#
#              # Specifies the name of the NDK library that
#              # you want CMake to locate.
#              log )



target_link_libraries( # Specifies the target library.
                       ndkapplication

                       # Links the target library to the log library
                       # included in the NDK.
                       #${log-lib}
        log
        fmod
        fmodL
        )